// 2014-02-01 Tyrghen
//---------------------------------------------
// Usage:
//  [] call edt_fnc_checkVar;
//---------------------------------------------
// Purpose:
// Deprecated, look at getVar
//---------------------------------------------
// Objectif:
// Obsolète, utilisez getVar
//---------------------------------------------

//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "editor\fn_checkVar.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

ERROR("CheckVar has been deprecated. Please use GetVar instead");

private ["_key","_value","_default"];
DEFAULT_PARAM(_key,0,"");
DEFAULT_PARAM(_default,1,nil);
if (!(IS_STRING(_key))) then {
	if (IS_SCALAR(_key)) then {
		_key = format[TMF_EDITOR_OBJECTIVE,_key];
	} else {
		_key = str(_key);
	};
};
_value = ([TMF_SERVER_INSTANCE_ID,_key,_default] call FFUNC(getMissionVar));
TRACE_1("End",_value);
TMFPROFILERSTOP;
_value;